package com.yh.controller;

import com.yh.common.BaseResult;
import com.yh.service.IGenService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 代码生成
 * @author yh
 */
@RestController
@RequestMapping("/gen")
@AllArgsConstructor
public class GenController {
    private final IGenService genService;

    @GetMapping("/genCode")
    public BaseResult gen(String tableName,String modeName,String datasource){
        genService.genCode(tableName,modeName,datasource);
        return BaseResult.success();
    }
}
